home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Demo
/
DesktopX
/
objects
/
ktekdockv1.dxpack
/
{2AD7E6E1-BEB9-4A70-BAFB-80FB5F0D7EFA}.DXScript2
< prev
next >
Wrap
Extensible Markup Language
|
2004-08-24
|
2KB
|
47 lines
<?xml version="1.0"?>
<!--DXScript Data File. Version 2.0-->
<DXScript>
<Script><![CDATA[Dim oX
Dim lower, upper, travel
Dim beingdragged
oX=0
lower=0
upper=100
travel=110
Sub Object_OnScriptEnter
beingdragged=False
value=0'initialise slider position
x=Cint(travel*(value-lower)/(upper-lower))
Object.Left=oX+x
End Sub
Function Object_OnLButtonDown(x, y)
beingdragged=True
End Function
Function Object_OnLButtonUp(x, y, Dragged)
beingdragged=False
s=DesktopX.ScriptObject("wmp").Control.status
If Dragged Then
If (Left(s, 7) = "Playing" Or left(s,6)="Paused") And DesktopX.ScriptObject("lstMediaType").Control.Text <> "Radio" Then
value=Object.Left-oX
range=upper-lower
proportion=value/travel
value=Cint(lower+proportion*range)
value=Clng(value*DesktopX.ScriptObject("wmp").Control.currentmedia.duration/100)
DesktopX.ScriptObject("wmp").Control.Controls.currentPosition = value
Else
Object.left = oX
End If
End If
End Function
Sub Object_OnDrag(x,y,x2,y2)
Object.top = Object.top
If x2<oX Then Object.left=oX
If x2>oX+travel Then Object.left=oX+travel
End Sub
]]></Script><Globals><Editor><PropPane>0</PropPane><EditorLeft>362</EditorLeft><EditorTop>49</EditorTop><EditorRight>1094</EditorRight><EditorBottom>908</EditorBottom></Editor><Object><LanguageCLSID>{B54F3741-5B07-11CF-A4B0-00AA004A55E8}</LanguageCLSID><ControlCLSID>{00000000-0000-0000-0000-000000000000}</ControlCLSID><ControlObjWidth>64</ControlObjWidth><ControlObjHeight>64</ControlObjHeight><RunState>1</RunState><ManualControlLoad>0</ManualControlLoad><ScriptHostVersion>2</ScriptHostVersion></Object></Globals></DXScript>